-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sample of building with ko #346
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright! I love how much this simplifies the pipeline. With the multi-stage build, we would have some reference on what tooling was used to do the build (we should probably switch the moving tag to a sha reference for the golang container). With this, I guess this responsibility falls on the github actions worker; how may we get this info? or can ko generate the SBOM of tooling used?
I'm still quite new to ko
, but so far I really like its UX.
+1 , I really like ko. I have not played with it for a while, so not sure if I can provide a meaningful review, but I support the adoption. |
https://ko.build/features/sboms/
It generates in SPDX by default, but we can also get it to publish in CycloneDX. I don't recall whether or not it already has I'm not sure how |
I do need to debug:
|
Oh! This is because I'm developing on a fork... Which is probably correct. @JAORMX -- how did you see building images from PRs working? I haven't used that flow before. |
i had heard about ko but never experimented with that. PIpeline looks way cleaner, so +1 on this change. |
Have you tested if the database migration works? I don't see any references that would include the files in the resulting image. |
I didn't copy in the files yet; to do that, we'll need to add (symlink is fine) files from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the UX for this tool and the direction it takes us. However, with the current setup it breaks the migration container:
Error while creating migration instance: open .: no such file or directory
2023/07/03 13:20:42 Connected to DB
the database/
folder needs to be included in the container for it to work. Is it possible to add that via ko
?
I think I've fixed all this. Unfortunately, along the way I needed to introduce a I also ended up doing some forceful overrides of the filepaths-in-config-files for the server; the other option would be to try to coordinate between the image working directory, the config file location, and the location that the I wanted to be clever and run the docker-compose as |
(All tests now pass, I did a few unspeakable things in |
Ready for review, @JAORMX . 😁 |
For discussion!!
Many larger projects in the Tekton/Sigstore ecosystem use
ko
to build container images; it's mostly maintained by Chainguard folks at the moment, but has been donated to the CNCF from Google.I didn't replicate all the tagging, but the rest of the functionality should be there (and we can remove the
Dockerfile
as well if we want).@JAORMX particularly for feedback